﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NullObjectStudy
{
    class Program
    {
        static void Main(string[] args)
        {
            ////1.测试单例模式
            //Student temp= Singleton<Student>.Instance;
            //Console.WriteLine(temp.GetCreateTime());
            //Console.WriteLine(temp.GetCreateTime());

            //Student temp2 = Singleton<Student>.Instance;
            //Console.WriteLine(temp2.GetCreateTime());

            ////2.测试NullObject模式
            //Console.WriteLine( StudentBLL.GetStudent().Age);

            //3.空事件模式
            NullEvent += delegate { };
            NullEvent(null,EventArgs.Empty);

            Console.ReadLine();
        }

        public static event EventHandler NullEvent;
    }
}
